package com.anycl.spring.knights;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class KnightMain {

    public static void main(String[] args) {
        ApplicationContext context = new
                ClassPathXmlApplicationContext("/spring/knights.xml");
/*        ApplicationContext context = new
                AnnotationConfigApplicationContext("com.anycl.spring.config");*/
        Knight knight = (Knight) context.getBean("knight");
        knight.embarkOnQuest();
    }
}
